package com.kuangstudy.common.demo6;

/**
 * ClassName: Demo2
 * date: 2021/07/14 13:38:00
 *
 * @author zlk
 */
public class Demo2 {
    public static void main(String[] args) {
        Integer integer = new Integer(100);
        Integer integer1 = new Integer(100);
        System.out.println(integer == integer1);//false

        /*自动装箱 Integer.valueOf(100)*/
        Integer integer2 = 100;
        Integer integer3 = 100;
        System.out.println(integer2 == integer3);//true

        Integer integer4 = 200;
        Integer integer5 = 200;
        System.out.println(integer4 == integer5);//fasle

    }
}
